using FreeSql.DataAnnotations;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;

namespace ProjectManageSystemApi.DbEntity
{

    /// <summary>
    /// 用户表
    /// </summary>
    [JsonObject(MemberSerialization.OptIn), Table(Name = "user_info", DisableSyncStructure = true)]
	public partial class UserInfo {

		[JsonProperty, Column(Name = "id", IsPrimary = true)]
		public long Id { get; set; }

		/// <summary>
		/// 用户登录名称(可以是邮箱,也可以是用户登录名)
		/// </summary>
		[JsonProperty, Column(Name = "user_name", StringLength = 50)]
		public string UserName { get; set; }

		/// <summary>
		/// 1:国内，2:海外
		/// </summary>
		[JsonProperty, Column(Name = "type", DbType = "tinyint(4)")]
		public sbyte? Type { get; set; }

		/// <summary>
		/// 昵称/会员名
		/// </summary>
		[JsonProperty, Column(Name = "nick_name", StringLength = 50)]
		public string NickName { get; set; }

		/// <summary>
		/// 真实姓名
		/// </summary>
		[JsonProperty, Column(Name = "real_name", StringLength = 50)]
		public string RealName { get; set; }

		/// <summary>
		/// 用户注册日期
		/// </summary>
		[JsonProperty, Column(Name = "register_date", DbType = "datetime")]
		public DateTime RegisterDate { get; set; }

		/// <summary>
		/// 性别(0女,1男)
		/// </summary>
		[JsonProperty, Column(Name = "sex", DbType = "tinyint(4)")]
		public sbyte? Sex { get; set; }

		/// <summary>
		/// 电话
		/// </summary>
		[JsonProperty, Column(Name = "phone_number", StringLength = 30)]
		public string PhoneNumber { get; set; }

		/// <summary>
		/// 邮箱
		/// </summary>
		[JsonProperty, Column(Name = "email", StringLength = 100)]
		public string Email { get; set; }

		/// <summary>
		/// 国家
		/// </summary>
		[JsonProperty, Column(Name = "country", StringLength = 20)]
		public string Country { get; set; }

		/// <summary>
		/// 省州
		/// </summary>
		[JsonProperty, Column(Name = "state", StringLength = 20)]
		public string State { get; set; }

		/// <summary>
		/// 城市
		/// </summary>
		[JsonProperty, Column(Name = "city", StringLength = 20)]
		public string City { get; set; }

		[JsonProperty, Column(Name = "desc", StringLength = 100)]
		public string Desc { get; set; }

		/// <summary>
		/// 公司名称
		/// </summary>
		[JsonProperty, Column(Name = "corp_name", StringLength = 100)]
		public string CorpName { get; set; }

		/// <summary>
		/// 公司电话
		/// </summary>
		[JsonProperty, Column(Name = "corp_phone", StringLength = 20)]
		public string CorpPhone { get; set; }

		/// <summary>
		/// 公司地址
		/// </summary>
		[JsonProperty, Column(Name = "corp_address", StringLength = 100)]
		public string CorpAddress { get; set; }

		/// <summary>
		/// 0：正常、1: 禁用 
		/// </summary>
		[JsonProperty, Column(Name = "status", DbType = "tinyint(4)")]
		public sbyte Status { get; set; }

		[Navigate(nameof(SysCoreUserRoleLink.UserId))]
		public List<SysCoreUserRoleLink> UserRoleLink { get; set; }

		public ProjectUserInfo ProjectUserInfo { get; set; }
	}

}
